//
//  FYFImageInfo.m
//  FYFPhotoBrowser
//
//  Created by fuyoufang on 16/5/14.
//  Copyright © 2016年 深圳－真二网. All rights reserved.
//

#import "FYFImageInfo.h"

@implementation FYFImageInfo

- (instancetype)initWithThumbnailURLString:(NSString *)thumbnailURLString originalURLString:(NSString *)originalURLString {
    if (self = [super init]) {
        self.thumbnailURLString = thumbnailURLString;
        self.originalURLString = originalURLString;
    }
    return self;
}

- (NSString *)originalURLString {
    if (_originalURLString == nil) {
        _originalURLString = [self.thumbnailURLString stringByReplacingOccurrencesOfString:@"thumbnail" withString:@"bmiddle"];
    }
    return _originalURLString;
}

+ (NSArray *)imageInfos {
    NSMutableArray *imageInfos = [NSMutableArray array];
    FYFImageInfo *imageInfo = [[FYFImageInfo alloc] initWithThumbnailURLString:@"http://ww2.sinaimg.cn/thumbnail/904c2a35jw1emu3ec7kf8j20c10epjsn.jpg" originalURLString:nil];
    [imageInfos addObject:imageInfo];
    
    imageInfo = [[FYFImageInfo alloc] initWithThumbnailURLString:@"http://ww2.sinaimg.cn/thumbnail/98719e4agw1e5j49zmf21j20c80c8mxi.jpg" originalURLString:nil];
    [imageInfos addObject:imageInfo];
    
    imageInfo = [[FYFImageInfo alloc] initWithThumbnailURLString:@"http://ww2.sinaimg.cn/thumbnail/67307b53jw1epqq3bmwr6j20c80axmy5.jpg" originalURLString:nil];
    [imageInfos addObject:imageInfo];
    
    imageInfo = [[FYFImageInfo alloc] initWithThumbnailURLString:@"http://ww2.sinaimg.cn/thumbnail/9ecab84ejw1emgd5nd6eaj20c80c8q4a.jpg" originalURLString:nil];
    [imageInfos addObject:imageInfo];
    
    imageInfo = [[FYFImageInfo alloc] initWithThumbnailURLString:@"http://ww2.sinaimg.cn/thumbnail/642beb18gw1ep3629gfm0g206o050b2a.gif" originalURLString:nil];
    [imageInfos addObject:imageInfo];
    
    imageInfo = [[FYFImageInfo alloc] initWithThumbnailURLString:@"http://ww1.sinaimg.cn/thumbnail/9be2329dgw1etlyb1yu49j20c82p6qc1.jpg" originalURLString:nil];
    [imageInfos addObject:imageInfo];
    
    return imageInfos;
    
}
@end
